package mythread.demo001;

public class MyThread6 extends Thread {

    private static String uname;
    private static String upwd;


    synchronized public static void doPost(String name, String pwd) {
        try {
            uname = name;
            if (name.equals("a")) {
                Thread.sleep(3000);
            }

            upwd = pwd;
            System.out.println("uname=" + uname + ",upwd=" + upwd);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
    }


}
